home *** CD-ROM | disk | FTP | other *** search
/ Champak 86 / (Vol 86) My Disc.iso / Games / restaurante_1422.swf / scripts / DefineSprite_515 / frame_2 / DoAction.as
Text File  |  2009-04-29  |  1KB  |  45 lines

  1. function affiche()
  2. {
  3.    tf.htmlText = "<b>" + _parent.chrono.minutes + " min " + _parent.chrono.seconds + " sec</b>";
  4.    if(_parent.chrono.minutes < 3)
  5.    {
  6.       unlockGoodies(wall_1);
  7.       unlockGoodies(wall_2);
  8.       unlockGoodies(wall_3);
  9.       tf2.text = msgs[0];
  10.    }
  11.    else if(_parent.chrono.minutes >= 3 && _parent.chrono.minutes < 4)
  12.    {
  13.       lockGoodies(wall_1);
  14.       unlockGoodies(wall_2);
  15.       unlockGoodies(wall_3);
  16.       tf2.text = msgs[2];
  17.    }
  18.    else
  19.    {
  20.       lockGoodies(wall_1);
  21.       lockGoodies(wall_2);
  22.       unlockGoodies(wall_3);
  23.       tf2.text = msgs[1];
  24.    }
  25. }
  26. function unlockGoodies(mc)
  27. {
  28.    trace(mc);
  29.    mc.filters = [];
  30. }
  31. function lockGoodies(mc)
  32. {
  33.    mc.onPress = null;
  34.    mc.enabled = false;
  35. }
  36. wall_2.img.wall_mc.gotoAndStop(2);
  37. wall_3.img.wall_mc.gotoAndStop(3);
  38. wall_1.nom = "citron_";
  39. wall_2.nom = "farine_";
  40. wall_3.nom = "beurre_";
  41. msgs = ["Great job; you got it in less than 3 minutes!","Well done, but you can do better!","That\'s good, but you need to practise a bit more"];
  42. tf.autoSize = "center";
  43. tf2.autoSize = "center";
  44. affiche();
  45.